#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<math.h>
int main()
{
	int n;
	char m;
	scanf("%d %c",&n, &m);
	int col= sqrt((n + 1) / 2);
	for (int i = col; i>0; i--)
	{
		for (int space = 0; space < col - i; space++)
		{
			printf(" ");
		}
		for (int k = 1; k <=i*2-1; k++)
		{

			printf("%c",m);
		}
		printf("\n");
	}
	for (int i = 1; i < col ; i++)
	{
		for (int space = col-1-i; space > 0; space--)
		{
			printf(" ");
		}
		for (int k = 1;k<=2*i+1;k++)
		{
			printf("%c",m);
		}
		printf("\n");
	}
	printf("%d", n - (col * col * 2 - 1));
	return 0;

}